package com.tony.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author tony
 * @date 2020/2/27 8:47 下午
 */
@Data
@ApiModel
public abstract class AbstractPageDTO {

    @NotNull
    @Min(value = 1L, message = "页数必须是数字，并且从1开始")
    @ApiModelProperty("页数（1开始）")
    protected Long current;

    @NotNull
    @Min(value = 1L, message = "页容量必须是数字，并且从1开始")
    @ApiModelProperty("页容量")
    protected Long size;
}
